package com.justyh.ssm.controller;

import com.justyh.ssm.service.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;

/**
 * Created by Chejianer on 2016/9/30.
 */
    @Controller
    @RequestMapping("/excel")
    public class ExcelController {
        @Autowired
        private ExcelService excelService;

      @RequestMapping(path={"","/"},method = {RequestMethod.GET})
       public Object index(){
           return new ModelAndView("excel");
       }
        @RequestMapping("/outExcel")
        public void toOutExcel(HttpServletResponse response, @RequestParam("userList") String userList){
            System.out.println(userList);
        }

    }

